/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mobilevikings.app;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Gauge;

/**
 *
 * @author Jeroen
 */
public class LoadAlert extends Alert {

    private Function mFunction;

    /**
     * Creates a LoadAlert
     * @param inTitle the title
     * @param inText the text
     * @param inFunction the function
     */
    public LoadAlert(String inTitle, String inText, Function inFunction) {
        super(inTitle, inText, null, AlertType.INFO);
        mFunction = inFunction;
        addCommand(mFunction.getMCmdCancel());
        setCommandListener(mFunction);
        setIndicator(new Gauge(null, false, Gauge.INDEFINITE, Gauge.CONTINUOUS_RUNNING));
        setTimeout(Alert.FOREVER);
    }
}
